Optimal. Leaf size=101 \[ -\frac {c^4 \tan (e+f x)}{a^2 f}-\frac {12 i c^4}{f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {6 i c^4 \log (\cos (e+f x))}{a^2 f}+\frac {6 c^4 x}{a^2}+\frac {4 i c^4}{f (a+i a \tan (e+f x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ -\frac {c^4 \tan (e+f x)}{a^2 f}-\frac {12 i c^4}{f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {6 i c^4 \log (\cos (e+f x))}{a^2 f}+\frac {6 c^4 x}{a^2}+\frac {4 i c^4}{f (a+i a \tan (e+f x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 3487
Rule 3522
Rubi steps
\begin {align*} \int \frac {(c-i c \tan (e+f x))^4}{(a+i a \tan (e+f x))^2} \, dx &=\left (a^4 c^4\right ) \int \frac {\sec ^8(e+f x)}{(a+i a \tan (e+f x))^6} \, dx\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \frac {(a-x)^3}{(a+x)^3} \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=-\frac {\left (i c^4\right ) \operatorname {Subst}\left (\int \left (-1+\frac {8 a^3}{(a+x)^3}-\frac {12 a^2}{(a+x)^2}+\frac {6 a}{a+x}\right ) \, dx,x,i a \tan (e+f x)\right )}{a^3 f}\\ &=\frac {6 c^4 x}{a^2}+\frac {6 i c^4 \log (\cos (e+f x))}{a^2 f}-\frac {c^4 \tan (e+f x)}{a^2 f}+\frac {4 i c^4}{f (a+i a \tan (e+f x))^2}-\frac {12 i c^4}{f \left (a^2+i a^2 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 2.63, size = 279, normalized size = 2.76 \[ \frac {c^4 \sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (-24 f x \sin ^2(e)-12 i f x \sin (2 e)+2 i \sin (2 e) \sin (4 f x)+12 i f x \tan (e)-2 \sin (2 e) \cos (4 f x)+i \sec (e) \cos (2 e-f x) \sec (e+f x)-i \sec (e) \cos (2 e+f x) \sec (e+f x)-\sec (e) \sin (2 e-f x) \sec (e+f x)+\sec (e) \sin (2 e+f x) \sec (e+f x)+6 \sin (2 e) \log \left (\cos ^2(e+f x)\right )-12 (\cos (2 e)+i \sin (2 e)) \tan ^{-1}(\tan (f x))+2 i \cos (2 e) \left (6 f x \tan (e)-3 \log \left (\cos ^2(e+f x)\right )+6 i f x+i \sin (4 f x)-\cos (4 f x)\right )+12 f x+8 \sin (2 f x)+8 i \cos (2 f x)\right )}{2 a^2 f (\tan (e+f x)-i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 133, normalized size = 1.32 \[ \frac {12 \, c^{4} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 3 i \, c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c^{4} + {\left (12 \, c^{4} f x - 6 i \, c^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (6 i \, c^{4} e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, c^{4} e^{\left (4 i \, f x + 4 i \, e\right )}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{a^{2} f e^{\left (6 i \, f x + 6 i \, e\right )} + a^{2} f e^{\left (4 i \, f x + 4 i \, e\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.51, size = 217, normalized size = 2.15 \[ -\frac {-\frac {6 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a^{2}} + \frac {12 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a^{2}} - \frac {6 i \, c^{4} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a^{2}} - \frac {2 \, {\left (-3 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 i \, c^{4}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} a^{2}} + \frac {-25 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 108 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 182 i \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 108 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 25 i \, c^{4}}{a^{2} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{4}}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.18, size = 86, normalized size = 0.85 \[ -\frac {c^{4} \tan \left (f x +e \right )}{a^{2} f}-\frac {12 c^{4}}{f \,a^{2} \left (\tan \left (f x +e \right )-i\right )}-\frac {4 i c^{4}}{f \,a^{2} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {6 i c^{4} \ln \left (\tan \left (f x +e \right )-i\right )}{f \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.84, size = 93, normalized size = 0.92 \[ -\frac {\frac {8\,c^4}{a^2}+\frac {c^4\,\mathrm {tan}\left (e+f\,x\right )\,12{}\mathrm {i}}{a^2}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}+2\,\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )}-\frac {c^4\,\mathrm {tan}\left (e+f\,x\right )}{a^2\,f}-\frac {c^4\,\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,6{}\mathrm {i}}{a^2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.59, size = 201, normalized size = 1.99 \[ \frac {2 i c^{4}}{- a^{2} f e^{2 i e} e^{2 i f x} - a^{2} f} + \begin {cases} \frac {\left (- 4 i a^{2} c^{4} f e^{4 i e} e^{- 2 i f x} + i a^{2} c^{4} f e^{2 i e} e^{- 4 i f x}\right ) e^{- 6 i e}}{a^{4} f^{2}} & \text {for}\: a^{4} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {12 c^{4}}{a^{2}} + \frac {\left (12 c^{4} e^{4 i e} - 8 c^{4} e^{2 i e} + 4 c^{4}\right ) e^{- 4 i e}}{a^{2}}\right ) & \text {otherwise} \end {cases} + \frac {12 c^{4} x}{a^{2}} + \frac {6 i c^{4} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a^{2} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________